<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FDWindow Test</title>
<!-- css -->
<link id="fd_theme" href="../../styles/theme/aristo/theme.css" rel="stylesheet" type="text/css" />
<link href="../../styles/primeui-1.1-min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body{font-size: 12px;}
</style>
<!-- lib -->
<script type="text/javascript" src="../../src/FDLib/FDLib.js"></script>
<script type="text/javascript" src="../../src/JsMap.js"></script>
<!-- app js -->
<script type="text/javascript" src="../theme.js"></script>
</head>
<body>
<button onclick="show()">show</button>
<button onclick="showOther()">show modal</button>
<button onclick="closeWin()">close</button>
<button onclick="setTitle()">setTitle</button>
<button onclick="appendContent()">appendContent</button>
<button onclick="moveTo()">moveTo(400,300)</button>

<div id="tip"></div>

<div id="win_content" style="display: none;">
记忆里那片永不凋落的树叶，葬在了那个璀璨的夏天。或许真的就是这样，一切的一切，都只是曾经的一段明媚的时光，是宿命的使然，无法逃脱，且不能改变。

那只属于青春的丰沛相思，那只属于过往的似水年华，经不起流光的辗转，指尖轻轻一戳，就会破碎。这是我们卑微的宿命。

明媚的天空下，望着云朵在空中飘摆，我总是告诉自己，不要再缅怀那些过去，然而抬起头，看看天空，那炽热的日光还是会将我满含眷念的眼眸硌疼，那云瑶里的微澜我的指尖也还是无法触摸，我，也还是我，那个忧郁得透蓝的少年。
</div>

<div id="win3_content" style="width: 400px;">
	<div>
		<table>
			<tr><td>用户名:</td><td id="username"></td></tr>
			<tr><td>密码:</td><td id="password"></td></tr>
			<tr><td>重复密码:</td><td id="rePassword"></td></tr>
			<tr><td>邮箱:</td><td id="email"></td></tr>
			<tr><td>性别:</td><td id="gender"></td></tr>
			<tr><td>地址:</td><td id="address"></td></tr>
			<tr><td>国家:</td><td id="country"></td></tr>
			<tr><td>出生日期:</td><td id="birthday"></td></tr>
		</table>
	</div>
</div>
<pre>










































































foot
</pre>
<button onclick="show()">show</button>
<script type="text/javascript">
FDLib.setDir('../../src/');
FDLib.openDebug()
var win;
var win3;
FDLib.loadJs(['FDWindow','FDTextBox','FDPasswordBox','FDRadio','FDSelectBox','FDDatePick'],function() {
	win = new FDWindow({
		contentId:'win_content'
		,title:'标题'
		,width:'300px'
		,height:'400px'
		,modal:false
		,afterShow:function(){tip.innerHTML = ('afterShow<br>')}
		,afterClose:function(){tip.innerHTML = ('afterClose<br>')} 
		,buttons:[
			new FDButton({text:'确定',onclick:function(){
				win.close();
			}})
			,new FDButton({text:'取消',onclick:function(){
				win.close();
			}})
		]
	});
	
	win3 = new FDWindow({
		contentId:'win3_content'
		,title:'标题3'
		,width:'500px'
		,buttons:[
			{text:'确定',onclick:function(){
				alert('OK')
			}}
			,{text:'取消',onclick:function(){
				win3.close(function(){
					alert('关闭后的操作')
				});
			}}
		 ]
	});
	new FDTextBox({domId:'username',name:"username",label:'用户名:'});
	new FDPasswordBox({domId:'password',name:'password',label:'密码:'});
	new FDPasswordBox({domId:'rePassword',name:'rePassword',label:'确认密码:'});
	new FDTextBox({domId:'email',name:"email",label:'邮箱:'});
	new FDTextBox({domId:'address',width:'250px',name:"address",label:'地址:'});
	new FDRadio({domId:'gender',name:"gender",label:'性别:',defaultValue:1,items:[{value:1,text:"男",checked:true},{value:0,text:"女"}]})
	new FDSelectBox({domId:'country',name:"country",label:'选择国家:',items:[{value:1,text:'中国'},{value:2,text:'法国'},{value:3,text:'美国'}]})
	new FDDatePick({domId:'birthday',name:"birthday",label:'出身日期:'})
});

function show() {
	win.show();
}
function showOther() {
	win3.show();
}
function closeWin() {
	win.close(function(){
		alert('after closed.')
	});
}
function setTitle() {
	win.setTitle("标题222");
}
var content = 'hello<br>world';
function appendContent() {
	content +='<br> hello world.....';
	win.setContent(content)
}
function moveTo() {
	win.moveTo(400,300);
}
</script>
</body>
</html>